if exists (select 1
            from  sysobjects
           where  id = object_id('bd_sys_codeRule')
            and   type = 'U')
   drop table bd_sys_codeRule
go

/*==============================================================*/
/* Table: bd_sys_codeRule                                       */
/*==============================================================*/
create table bd_sys_codeRule (
   classId              VARCHAR(20)          not null,
   identifyCode         VARCHAR(10)          null,
   prefix               VARCHAR(10)          null,
   length               INT                  not null default 0,
   suffix               VARCHAR(10)          null,
   fill                 VARCHAR(10)          null,
   codeType             INT                  not null default 0,
   increment            INT                  not null default 1,
   remark               VARCHAR(50)          null,
   curDate              VARCHAR(15)          null,
   curValue             INT                  not null default 0,
   constraint PK_BD_SYS_CODERULE primary key (classId)
)
go
